package org.budo.jdbc.driver.resultset.impl;

import java.sql.SQLException;

import lombok.NoArgsConstructor;

/**
 * 二维数组
 * 
 * @author lmw
 */
@NoArgsConstructor
public class MatrixArrayResultSet extends ObjectArrayResultSet<Object[]> {
    /**
     * @see #wasNull()
     */
    @Override
    protected Object getColumnValueRaw(int columnIndex) throws SQLException {
        Object[] row = this.getValueArray()[this.getRowNumber()];
        Object value = row[columnIndex - 1];
        if (null == value) {
            this.setLastValueWasNull(true);
        }
        return value;
    }
}